package com.peanut.persistence;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

@Repository
public class DataQualityDaoIbatis extends BaseDaoIbatis {
	public List queryNewestProblemInCompany(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryNewestProblemInCompany", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryNewestProblemInCompanyCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryNewestProblemInCompanyCount", 
				param);
	}
	
	public List queryNewestProblemInProduct(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryNewestProblemInProduct", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryNewestProblemInProductCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryNewestProblemInProductCount", 
				param);
	}
	
	public List queryNewestProblemInCheckPoint(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryNewestProblemInCheckPoint", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryNewestProblemInCheckPointCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryNewestProblemInCheckPointCount", 
				param);
	}
	
	public List queryConventionDataInCompany(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryConventionDataInCompany", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryConventionDataInCompanyCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryConventionDataInCompanyCount", 
				param);
	}
	
	public List queryConventionDataInProduct(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryConventionDataInProduct", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryConventionDataInProductCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryConventionDataInProductCount", 
				param);
	}
	
	public List queryConventionDataInCheckPoint(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryConventionDataInCheckPoint", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryConventionDataInCheckPointCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryConventionDataInCheckPointCount", 
				param);
	}
	
	public List queryConsistencyDataInCompany(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryConsistencyDataInCompany", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryConsistencyDataInCompanyCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryConsistencyDataInCompanyCount", 
				param);
	}
	
	public List queryConsistencyDataInCheckPoint(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryConsistencyDataInCheckPoint", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryConsistencyDataInCheckPointCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryConsistencyDataInCheckPointCount", 
				param);
	}
	
	public List queryAssessmentInCompany(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryAssessmentInCompany", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryAssessmentInCompanyCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryAssessmentInCompanyCount", 
				param);
	}
	
	public List queryAssessmentInProduct(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryAssessmentInProduct", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryAssessmentInProductCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryAssessmentInProductCount", 
				param);
	}
	
	public List queryAssessmentInCheckPoint(Map param, int offset, int limit) {
		return this.getSqlSession()
			.selectList("com.peanut.persistence.DataQualityMapper.queryAssessmentInCheckPoint", 
					param, new RowBounds(offset, limit));
	}
	
	public long queryAssessmentInCheckPointCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryAssessmentInCheckPointCount", 
				param);
	}
	
	public List<HashMap<String, String>> queryDateRecord() {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryDateRecord");
	}
	
	public List<HashMap<String, String>> queryProduct() {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryProduct");
	}
	
	public List<HashMap<String, String>> queryProvince() {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryProvince");
	}
	
	public List<HashMap<String, String>> queryCity(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryCity", param);
	}
	
	public List<HashMap<String, String>> queryCounty(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryCounty", param);
	}
	
	public List<HashMap<String, String>> queryCompanyByCode(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryCompanyByCode", param);
	}
	
	public List<HashMap<String, String>> queryCheckPointList(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryCheckPointList", param);
	}
	
	public List<HashMap<String, String>> queryInitCheckPoint(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryInitCheckPoint", param);
	}
	
	public List<HashMap<String, String>> queryPointTableInfo(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryPointTableInfo", param);
	}
	
	public List<HashMap<String, String>> queryPointHeaderInfo(Map param) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryPointHeaderInfo", param);
	}
	
	public List<HashMap<String, String>> queryWrongListForExport(Map param, int offset, int limit) {
		return this.getSqlSession().selectList("com.peanut.persistence.DataQualityMapper.queryWrongListForExport", 
				param, new RowBounds(offset, limit));
	}
	
	public long queryWrongListForExportCount(Map param) {
		return (Long)this.getSqlSession().selectOne("com.peanut.persistence.DataQualityMapper.queryWrongListForExportCount", 
				param);
	}
}
